import { createRouter, createWebHashHistory } from "vue-router";
// import type { RouteRecordRaw } from "vue-router";

const routes = [
  {
    path: "/",
    name: "init",
    component: () => import("@/views/Init.vue"),
  },
  // 首页
  {
    path: "/home",
    name: "home",
    component: () => import("@/views/home/index.vue"),
  },
  // 我的维修
  {
    path: "/repair",
    name: "repair",
    component: () => import("@/views/repair/index.vue"),
  },
  // 维修详情
  {
    path: "/repair/detail",
    name: "repairDetail",
    component: () => import("@/views/repair/detail/index.vue"),
  },
  // 设备维修列表
  {
    path: "/repairList",
    name: "repairList",
    component: () => import("@/views/repairList/index.vue"),
  },
  // 设备维修配置
  {
    path: "/repairList/set",
    name: "repairListSet",
    component: () => import("@/views/repairList/set/index.vue"),
  },
  // 维修人员
  {
    path: "/repairList/set/person",
    name: "repairListSetPerson",
    component: () => import("@/views/repairList/set/person/index.vue"),
  },
];

const router = createRouter({
  routes,
  history: createWebHashHistory(),
});

export default router;
